package com.daji.reference;

import com.daji.pojo.User;
import org.springframework.beans.BeanUtils;

public class TestReference2 {
    public static void main(String[] args) {
//        User user = new User("卢本伟");
//        User user1 = user;
//        user.setUserName("大吉");
//        System.out.println("user:"+user);
//        System.out.println("user1:"+user1);


        System.out.println("================分割线================");


        User user = new User("卢本伟");
        User user1 = new User();
        BeanUtils.copyProperties(user,user1);
        user.setUserName("大吉");
        System.out.println("user:"+user);
        System.out.println("user1:"+user1);

    }
}
